<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  
  <title>redis学习整理 | 华锅锅的博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
    <meta name="keywords" content="Huaguoguo,Huaguoguo's Blog">
  
  <meta name="description" content="redis使用规范redis保存对象用hash我们经常把json当成一个大String直接放在redis中，每次更新都要获取整个字符串，更改其中一个字段后再放回去，这样频繁更新会对网络I/O造成很大压力；因此官方推荐用hash来保存对象，更新字段时，就可以只修改特定的字段，减小I/O压力问题：java中如何实现利用hash增删改查对象 缓存访问模式1. 双读双写 2. 异步更新 3. 串联模式 缓">
<meta name="keywords" content="分布式,缓存">
<meta property="og:type" content="article">
<meta property="og:title" content="redis学习整理">
<meta property="og:url" content="http://huaguoguo.gitee.io/2019/05/11/redis/index.html">
<meta property="og:site_name" content="华锅锅的博客">
<meta property="og:description" content="redis使用规范redis保存对象用hash我们经常把json当成一个大String直接放在redis中，每次更新都要获取整个字符串，更改其中一个字段后再放回去，这样频繁更新会对网络I/O造成很大压力；因此官方推荐用hash来保存对象，更新字段时，就可以只修改特定的字段，减小I/O压力问题：java中如何实现利用hash增删改查对象 缓存访问模式1. 双读双写 2. 异步更新 3. 串联模式 缓">
<meta property="og:locale" content="default">
<meta property="og:image" content="https://huaguoguo.gitee.io/images/QQ%E6%88%AA%E5%9B%BE20190510114128.png">
<meta property="og:image" content="https://huaguoguo.gitee.io/images/QQ%E6%88%AA%E5%9B%BE20190510114439.png">
<meta property="og:image" content="https://huaguoguo.gitee.io/images/QQ%E6%88%AA%E5%9B%BE20190510114448.png">
<meta property="og:updated_time" content="2019-05-13T03:36:22.662Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="redis学习整理">
<meta name="twitter:description" content="redis使用规范redis保存对象用hash我们经常把json当成一个大String直接放在redis中，每次更新都要获取整个字符串，更改其中一个字段后再放回去，这样频繁更新会对网络I/O造成很大压力；因此官方推荐用hash来保存对象，更新字段时，就可以只修改特定的字段，减小I/O压力问题：java中如何实现利用hash增删改查对象 缓存访问模式1. 双读双写 2. 异步更新 3. 串联模式 缓">
<meta name="twitter:image" content="https://huaguoguo.gitee.io/images/QQ%E6%88%AA%E5%9B%BE20190510114128.png">
  
  
    <link rel="icon" href="/favicon.ico">
  
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css">
  <script src="/js/pace.min.js"></script>
  

  
  

</head>
</html>
<body>
  <div id="container">
      <header id="header">
    <div id="banner"></div>
    <div id="header-outer">
        <div id="header-menu" class="header-menu-pos animated">
            <div class="header-menu-container">
                <a href="/" class="left">
                    <span class="site-title">Huaguoguo&#39;s Blog</span>
                </a>
                <nav id="header-menu-nav" class="right">
                    
                    <a href="/">
                        <i class="fa fa-home"></i>
                        <span>Home</span>
                    </a>
                    
                    <a href="/archives">
                        <i class="fa fa-archive"></i>
                        <span>Archives</span>
                    </a>
                    
                    <a href="/about">
                        <i class="fa fa-user"></i>
                        <span>About</span>
                    </a>
                    
                </nav>
                <a class="mobile-header-menu-button">
                    <i class="fa fa-bars"></i>
                </a>
            </div>
        </div>
        <div id="header-row">
            <div id="logo">
                <a href="/">
                    <img src="/images/logo.png" alt="logo">
                </a>
            </div>
            <div class="header-info">
                <div id="header-title">
                    
                    <h2>
                        Huaguoguo&#39;s Blog
                    </h2>
                    
                </div>
                <div id="header-description">
                    
                    <h3>
                        敲代码是热爱，敲到世界充满爱
                    </h3>
                    
                </div>
            </div>
            <nav class="header-nav">
                <div class="social">
                    
                        <a title="home" target="_blank" href="//huaguoguo.gitee.io">
                            <i class="fa fa-home fa-2x"></i></a>
                    
                        <a title="Github" target="_blank" href="//gitee.com/huaguoguo">
                            <i class="fa fa-github fa-2x"></i></a>
                    
                </div>
            </nav>
        </div>
    </div>
</header>
      <div class="outer">
        <section id="main" class="body-wrap"><article id="post-redis" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="post-title" itemprop="name">
      redis学习整理
    </h1>
    <div class="post-title-bar">
      <ul>
          
        <li>
          <i class="fa fa-calendar"></i>  2019-05-11
        </li>
        <li>
          <i class="fa fa-eye"></i>
          <span id="busuanzi_value_page_pv"></span>
        </li>
      </ul>
    </div>
  

          
      </header>
    
    <div class="article-entry post-content" itemprop="articleBody">
      
            
            <h1 id="redis使用规范"><a href="#redis使用规范" class="headerlink" title="redis使用规范"></a>redis使用规范</h1><h2 id="redis保存对象用hash"><a href="#redis保存对象用hash" class="headerlink" title="redis保存对象用hash"></a>redis保存对象用hash</h2><p>我们经常把json当成一个大String直接放在redis中，每次更新都要获取整个字符串，更改其中一个字段后再放回去，这样频繁更新会对网络I/O造成很大压力；<br><br>因此官方推荐用hash来保存对象，更新字段时，就可以只修改特定的字段，减小I/O压力<br><br>问题：java中如何实现利用hash增删改查对象</p>
<h1 id="缓存访问模式"><a href="#缓存访问模式" class="headerlink" title="缓存访问模式"></a>缓存访问模式</h1><h2 id="1-双读双写"><a href="#1-双读双写" class="headerlink" title="1. 双读双写"></a>1. 双读双写</h2><p><img src="https://huaguoguo.gitee.io/images/QQ%E6%88%AA%E5%9B%BE20190510114128.png" alt="双读双写"></p>
<h2 id="2-异步更新"><a href="#2-异步更新" class="headerlink" title="2. 异步更新"></a>2. 异步更新</h2><p><img src="https://huaguoguo.gitee.io/images/QQ%E6%88%AA%E5%9B%BE20190510114439.png" alt="异步更新"></p>
<h2 id="3-串联模式"><a href="#3-串联模式" class="headerlink" title="3. 串联模式"></a>3. 串联模式</h2><p><img src="https://huaguoguo.gitee.io/images/QQ%E6%88%AA%E5%9B%BE20190510114448.png" alt="串联模式"></p>
<h1 id="缓存问题"><a href="#缓存问题" class="headerlink" title="缓存问题"></a>缓存问题</h1><h2 id="1-缓存穿透"><a href="#1-缓存穿透" class="headerlink" title="1. 缓存穿透"></a>1. 缓存穿透</h2><p>通常是恶意攻击或者无意造成的<br><br>我们通常将空值缓存起来，再次接收到同样的查询请求时，若命中缓存并且值为空，就会 直接返回，不会透传到数据库，避免缓存穿透。当然，有时恶意袭击者可以猜到我们使用了这 种方案，每次都会使用不同的参数来査询，这就需要我们对输入的参数进行过滤，例如，如采我们使用ID进行查询，则可以对ID的格式进行分析，如果不符合产生ID的规则，就直接拒绝，或者在ID上放入时间信息，根据时间信息判断ID是否合法，或者是否是我们曾经生成的ID，这样可以拦截一定的无效请求。<br><br>当然，每个设计人员都应该对服务的可用性和健壮性负责，应该建设健壮的服务，让我们 的服务像不倒翁一样，闪此，我们需要对服务设计限流和熔断等功能。</p>
<h2 id="2-缓存并发"><a href="#2-缓存并发" class="headerlink" title="2. 缓存并发"></a>2. 缓存并发</h2><h2 id="3-缓存雪崩"><a href="#3-缓存雪崩" class="headerlink" title="3. 缓存雪崩"></a>3. 缓存雪崩</h2><p>缓存雪崩指缓存服务器重启或者大量缓存集中在某个时间段内失效，给后端数据库造成瞬时的负载升高的压力，其至压垮数据库的怙况。<br><br>通常的解决办法是对不同的数据使用不同的失效时间，甚至对相同的数据、不同请求使用不同的失效时间，例如，我们要缓存user数据，会对每个用户的数据设置不同的缓存过期时间，可以定义一个基础时间，假设10秒，然后加上一个两秒以内的随机数，过期时间为10〜12秒，就会避免缓存雪崩。</p>
<h1 id="分布式缓存设计"><a href="#分布式缓存设计" class="headerlink" title="分布式缓存设计"></a>分布式缓存设计</h1><h2 id="1-缓存设计的核心要素"><a href="#1-缓存设计的核心要素" class="headerlink" title="1. 缓存设计的核心要素"></a>1. 缓存设计的核心要素</h2><h3 id="1-1-容量规划"><a href="#1-1-容量规划" class="headerlink" title="1.1 容量规划"></a>1.1 容量规划</h3><ul>
<li>缓存内容的大小</li>
<li>缓存内容的数量</li>
<li>淘汰策略</li>
<li>缓存的数据结构</li>
<li>每秒的读峰值</li>
<li>每秒的写峰值<h3 id="1-2-性能优化"><a href="#1-2-性能优化" class="headerlink" title="1.2 性能优化"></a>1.2 性能优化</h3></li>
<li>线程模型</li>
<li>预热方法</li>
<li>缓存分片</li>
<li>冷热数据的比例<h3 id="1-3-高可用"><a href="#1-3-高可用" class="headerlink" title="1.3 高可用"></a>1.3 高可用</h3></li>
<li>复制模型</li>
<li>失效转移</li>
<li>持久策略</li>
<li>缓存重建<h3 id="1-4-缓存监控"><a href="#1-4-缓存监控" class="headerlink" title="1.4 缓存监控"></a>1.4 缓存监控</h3></li>
<li>缓存服务监控</li>
<li>缓存容量监控</li>
<li>缓存请求监控</li>
<li>缓存响应时间监控<h3 id="1-5-注意事项"><a href="#1-5-注意事项" class="headerlink" title="1.5 注意事项"></a>1.5 注意事项</h3></li>
<li>是否有可能发生缓存穿透</li>
<li>是否有大对象</li>
<li>是否使用缓存实现分布式锁</li>
<li>是否使用缓存支持的脚本(Lua)</li>
<li>是否避免了 Race Condition</li>
</ul>

            <div class="post-copyright">
    <div class="content">
        <p>最后更新： 2019年05月13日 11:36</p>
        <p>原始链接： <a class="post-url" href="/2019/05/11/redis/" title="redis学习整理">http://huaguoguo.gitee.io/2019/05/11/redis/</a></p>
        <footer>
            <a href="http://huaguoguo.gitee.io">
                <img src="/images/logo.png" alt="华锅锅">
                华锅锅
            </a>
        </footer>
    </div>
</div>

      
        
            
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;">赏</a>
</div>

<div id="reward" class="post-modal reward-lay">
    <a class="close" href="javascript:;" id="reward-close">×</a>
    <span class="reward-title">
        <i class="icon icon-quote-left"></i>
        请我吃糖~
        <i class="icon icon-quote-right"></i>
    </span>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/images/wechat_code.png" alt="打赏二维码">
        </div>
        <div class="reward-select">
            
            <label class="reward-select-item checked" data-id="wechat" data-wechat="/images/wechat_code.png">
                <img class="reward-select-item-wechat" src="/images/wechat.png" alt="微信">
            </label>
            
            
            <label class="reward-select-item" data-id="alipay" data-alipay="/images/alipay_code.png">
                <img class="reward-select-item-alipay" src="/images/alipay.png" alt="支付宝">
            </label>
            
        </div>
    </div>
</div>


        
    </div>
    <footer class="article-footer">
        
        
<div class="post-share">
    <a href="javascript:;" id="share-sub" class="post-share-fab">
        <i class="fa fa-share-alt"></i>
    </a>
    <div class="post-share-list" id="share-list">
        <ul class="share-icons">
          <li>
            <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://huaguoguo.gitee.io/2019/05/11/redis/&title=《redis学习整理》 — 华锅锅的博客&pic=/images/redis_logo.jpg" data-title="微博">
              <i class="fa fa-weibo"></i>
            </a>
          </li>
          <li>
            <a class="weixin share-sns" id="wxFab" href="javascript:;" data-title="微信">
              <i class="fa fa-weixin"></i>
            </a>
          </li>
          <li>
            <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://huaguoguo.gitee.io/2019/05/11/redis/&title=《redis学习整理》 — 华锅锅的博客&source=敲代码是热爱，敲到世界充满爱" data-title="QQ">
              <i class="fa fa-qq"></i>
            </a>
          </li>
          <li>
            <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://huaguoguo.gitee.io/2019/05/11/redis/" data-title="Facebook">
              <i class="fa fa-facebook"></i>
            </a>
          </li>
          <li>
            <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《redis学习整理》 — 华锅锅的博客&url=http://huaguoguo.gitee.io/2019/05/11/redis/&via=http://huaguoguo.gitee.io" data-title="Twitter">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
          <li>
            <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://huaguoguo.gitee.io/2019/05/11/redis/" data-title="Google+">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        </ul>
     </div>
</div>
<div class="post-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;" id="wxShare-close">×</a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://huaguoguo.gitee.io/2019/05/11/redis/" alt="微信分享二维码">
</div>

<div class="mask"></div>

        
        <ul class="article-footer-menu">
            
            
  <li class="article-footer-tags">
    <i class="fa fa-tags"></i>
      
    <a href="/tags/分布式/" class="color4">分布式</a>
      
    <a href="/tags/缓存/" class="color3">缓存</a>
      
  </li>

        </ul>
        
    </footer>
  </div>
</article>


    <aside class="post-toc-pos post-toc-top" id="post-toc">
        <nav class="post-toc-wrap">
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#redis使用规范"><span class="post-toc-text">redis使用规范</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#redis保存对象用hash"><span class="post-toc-text">redis保存对象用hash</span></a></li></ol></li><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#缓存访问模式"><span class="post-toc-text">缓存访问模式</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#1-双读双写"><span class="post-toc-text">1. 双读双写</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#2-异步更新"><span class="post-toc-text">2. 异步更新</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#3-串联模式"><span class="post-toc-text">3. 串联模式</span></a></li></ol></li><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#缓存问题"><span class="post-toc-text">缓存问题</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#1-缓存穿透"><span class="post-toc-text">1. 缓存穿透</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#2-缓存并发"><span class="post-toc-text">2. 缓存并发</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#3-缓存雪崩"><span class="post-toc-text">3. 缓存雪崩</span></a></li></ol></li><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#分布式缓存设计"><span class="post-toc-text">分布式缓存设计</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#1-缓存设计的核心要素"><span class="post-toc-text">1. 缓存设计的核心要素</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#1-1-容量规划"><span class="post-toc-text">1.1 容量规划</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#1-2-性能优化"><span class="post-toc-text">1.2 性能优化</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#1-3-高可用"><span class="post-toc-text">1.3 高可用</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#1-4-缓存监控"><span class="post-toc-text">1.4 缓存监控</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#1-5-注意事项"><span class="post-toc-text">1.5 注意事项</span></a></li></ol></li></ol></li></ol>
        </nav>
    </aside>
    

<nav id="article-nav">
  
    <a href="/2019/05/11/cache/" id="article-nav-newer" class="article-nav-link-wrap">

      <span class="article-nav-title">
        <i class="fa fa-hand-o-left" aria-hidden="true"></i>
        
          cache
        
      </span>
    </a>
  
  
    <a href="/2019/05/05/id-gen/" id="article-nav-older" class="article-nav-link-wrap">
      <span class="article-nav-title">高性能发号器-Vesta</span>
      <i class="fa fa-hand-o-right" aria-hidden="true"></i>
    </a>
  
</nav>



    
        <div id="SOHUCS" sid="redis"></div>
<script type="text/javascript">
    (function(){
        var appid = 'cyudxaFKB';
        var conf = 'e3991feeac8273781b96fbec365fe014';
        var width = window.innerWidth || document.documentElement.clientWidth;
        if (width < 960) {
            window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script>
    
</section>
        
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info" class="inner">
      
<p>
    <span id="busuanzi_container_site_uv" style="display:none">
        总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style="display:none">
        总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


      <p>
        Powered by  <a href="http://hexo.io/" target="_blank">Hexo</a>
        Theme <a href="//github.com/wongminho/hexo-theme-miho" target="_blank">MiHo</a>
      &copy; 2020 华锅锅<br>
      </p>
    </div>
  </div>
</footer>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
  var mihoConfig = {
      root: "http://huaguoguo.gitee.io",
      animate: true,
      isHome: false,
      share: true,
      reward: 1
  }
</script>
<div class="sidebar">
    <div id="sidebar-search" title="Search">
        <i class="fa fa-search"></i>
    </div>
    <div id="sidebar-category" title="Categories">
        <i class="fa fa-book"></i>
    </div>
    <div id="sidebar-tag" title="Tags">
        <i class="fa fa-tags"></i>
    </div>
    <div id="sidebar-top">
        <span class="sidebar-top-icon"><i class="fa fa-angle-up"></i></span>
    </div>
</div>
<div class="sidebar-menu-box" id="sidebar-menu-box">
    <div class="sidebar-menu-box-container">
        <div id="sidebar-menu-box-categories">
            <a class="category-link" href="/categories/First/">First</a>
        </div>
        <div id="sidebar-menu-box-tags">
            <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="/tags/Sample/" style="font-size: 10px;">Sample</a> <a href="/tags/java/" style="font-size: 20px;">java</a> <a href="/tags/分布式/" style="font-size: 15px;">分布式</a> <a href="/tags/学习方法/" style="font-size: 10px;">学习方法</a> <a href="/tags/数据库/" style="font-size: 15px;">数据库</a> <a href="/tags/缓存/" style="font-size: 10px;">缓存</a> <a href="/tags/集合/" style="font-size: 10px;">集合</a>
        </div>
    </div>
    <a href="javascript:;" class="sidebar-menu-box-close">&times;</a>
</div>
<div class="mobile-header-menu-nav" id="mobile-header-menu-nav">
    <div class="mobile-header-menu-container">
        <span class="title">Menus</span>
        <ul class="mobile-header-menu-navbar">
            
            <li>
                <a href="/">
                    <i class="fa fa-home"></i><span>Home</span>
                </a>
            </li>
            
            <li>
                <a href="/archives">
                    <i class="fa fa-archive"></i><span>Archives</span>
                </a>
            </li>
            
            <li>
                <a href="/about">
                    <i class="fa fa-user"></i><span>About</span>
                </a>
            </li>
            
        </ul>
    </div>
    <div class="mobile-header-tag-container">
        <span class="title">Tags</span>
        <div id="mobile-header-container-tags">
            <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="/tags/Sample/" style="font-size: 10px;">Sample</a> <a href="/tags/java/" style="font-size: 20px;">java</a> <a href="/tags/分布式/" style="font-size: 15px;">分布式</a> <a href="/tags/学习方法/" style="font-size: 10px;">学习方法</a> <a href="/tags/数据库/" style="font-size: 15px;">数据库</a> <a href="/tags/缓存/" style="font-size: 10px;">缓存</a> <a href="/tags/集合/" style="font-size: 10px;">集合</a>
        </div>
    </div>
</div>
<div class="search-wrap">
    <span class="search-close">&times;</span>
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
            <i class="icon icon-lg icon-chevron-left"></i>
        </a>
        <input class="search-field" placeholder="Search..." id="keywords">
        <a id="search-submit" href="javascript:;">
            <i class="fa fa-search"></i>
        </a>
    <div class="search-container" id="search-container">
        <ul class="search-result" id="search-result">
        </ul>
    </div>
</div>

<div id="search-tpl">
    <li class="search-result-item">
        <a href="{url}" class="search-item-li">
            <span class="search-item-li-title" title="{title}">{title}</span>
        </a>
    </li>
</div>
<script src="/js/search.js"></script>
<script src="/js/main.js"></script>


  <script src="//cdn.bootcss.com/particles.js/2.0.0/particles.min.js"></script>
  <div id="particles"></div>
  <script src="/js/particles.js"></script>







  <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  <script src="//cdn.bootcss.com/scrollReveal.js/3.0.5/scrollreveal.js"></script>
  <script src="/js/animate.js"></script>


  <script src="/js/pop-img.js"></script>
  <script>
     $(".article-entry p img").popImg();
  </script>

  </div>
</body>
</html>